package cn.itcast.dao.cargo;

import cn.itcast.domain.cargo.Contract;
import cn.itcast.domain.cargo.ContractExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContractDao {

	//删除
    int deleteByPrimaryKey(String id);

	//保存
    int insertSelective(Contract record);

	//条件查询
    List<Contract> selectByExample(ContractExample example);

	//id查询
    Contract selectByPrimaryKey(String id);

	//更新
    int updateByPrimaryKeySelective(Contract record);

    //查询本部门以及下属部门的购销合同
    List<Contract> findPageByDeptId(@Param("companyId") String companyId,@Param("deptId") String deptId);


    //查找所有的交货期限
    List<String> findAllDeliveryPeriod();

    List<Contract> findContractAfterThreeDays(String formatDate);
}